/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年7月2日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package test.lesson3.hashcode;

/**
 * @Type StuInfo
 * @Desc
 * @author 52489
 * @date 2019年7月2日
 * @Version V1.0
 */
public class StuInfo {
    private int age;
    private String name;

    @Override
    public String toString() {
        return "StuInfo [age=" + age + ", name=" + name + "]";
    }

    /**
     * @param age
     */
    public StuInfo(int age) {
        super();
        this.age = age;
    }

    /**
     * @param age
     * @param name
     */
    public StuInfo(int age, String name) {
        super();
        this.age = age;
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 散列 重写
     */
    @Override
    public int hashCode() {
        return age;
    }

}
